package com.jijidom.product.exception;

import com.jijidom.product.enums.ResultEnum;

/**
 * @author JinTao
 * @version 1.0
 * 类说明
 * @Date 2018/10/15 17:40
 */
public class ProductException extends RuntimeException {

    /** 
	 * @Fields serialVersionUID ：TODO
	 */ 
	private static final long serialVersionUID = 1L;
	@SuppressWarnings("unused")
	private Integer code;

    public ProductException(Integer code, String message){
        super(message);
        this.code = code;
    }

    public ProductException(ResultEnum resultEnum){
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }
}
